<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="UTF-8">
    <title>Sucha's Blog - Archive for October, 2021</title>
    <meta name="generator" content="MarkdownProjectCompositor.lua">
    <meta name="author" content="Sucha">
    <meta name="keywords" content="suchang, programming, Linux, Lua">
    <meta name="description" content="Sucha's blog">
    <link rel="shortcut icon" href="../images/ico.png">
    <link rel="stylesheet" type="text/css" href="../styles/blog.css">
    <link rel="stylesheet" type="text/css" href="../styles/prism.min.css">
    <style id="site_theme"></style>
  </head>
  <body>
    <div id="body">
      <div id="text">
	   <!-- Page published by cmark-gfm begins here --><h1>Sucha's Blog ~ Archive for October, 2021</h1>
<p><a id="p0"></a></p>
<div class="date">21年10月02日 周一 22:48</div>
<h2>独立 SideBar</h2>
<p>将 site 和 blog 的边栏 sidebar 独立到各自不同的 js 文件上去了，比如</p>
<ul>
<li><a href="../js/site_sidebar.js">site_sidebar.js</a></li>
<li><a href="../js/blog_sidebar.js">blog_sidebar.js</a></li>
</ul>
<p>修改后的好处，是需要更新 archive links 时，也只需要更新对应的 sidebar js，而不需要更新每个月份输出的 HTML 了。而之前作为 static site generator，是独立输出到每个月份 HTML 上面去的。</p>
<p>内容跟 sidebar 分离后，完全可以没有什么顾忌的更新 sidebar 了，当然其实我也几乎不会更新 sidebar，感觉没啥必要，🤗</p>
<div class="category"><a href="CategoryThisSite.html">CategoryThisSite</a> / <a href="2021-10.html#p0">Permalink</a> / <a href="https://github.com/lalawue/homepage/discussions/categories/blog" target="_blank">Discussion</a></div>
<!-- Page published by cmark-gfm ends here -->
  <div id="foot">2004-<script>var d = new
	Date();document.write(d.getFullYear())</script> &copy;
	Sucha. Powered by MarkdownProjectCompositor.
  </div>
  </div><!-- text -->
  <div id="sidebar">
  </div><!-- sidebar -->
  <script src="../js/prism.min.js" async="async"></script>
  <script src="../js/blog_sidebar.js"></script>
  </div> <!-- body -->
</body>
</html>